fix(core): use correct mjolnir requireFailure key for recognizers#10323
Merged
chrisgervang merged 5 commits intoJun 11, 2026
Merged
Conversation
chrisgervang
approved these changes
May 22, 2026
chrisgervang
left a comment
Collaborator
There was a problem hiding this comment.
I'm surprised this wasn't caught by typescript on the EventManager's recognizers param. Can that type need to be improved?
The EventManager's RecognizerTupleNormalized expects `requireFailure`,
but Deck was passing `requestFailure`. The key was silently dropped, so
every requireFailure relationship declared in RECOGNIZERS (pinch waiting
for multipan, single-finger pan waiting for multipan, click waiting for
dblclick) never took effect.
On mobile this caused pinch to fire on any 2-finger touch and beat the
multipan recognizer to the gesture: a 2-finger vertical drag would land
in pinch's `controllerState.zoom({pos, scale: ~1})` instead of
`_onMultiPan → rotate({pos})`, so the camera re-anchored its
longitude/latitude (looked like a pan) and picked up tiny bearing
changes from inter-finger rotation deltas — and pitch never engaged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
de24093 to
7501827
Compare
Collaborator
Author
|
Re: the TypeScript question — agreed, the type
Two tightening options, neither in scope here but I'm happy to follow up:
Want me to open a follow-up PR for either? |
Collaborator
|
I would like for some coverage in this PR so that the regression doesn't come back again. It could be a test if types can't cover it |
Collaborator
Author
|
Added in 725e724 — regression test asserts pinch/pan/click each have the right blocking recognizer in their mjolnir |
Construct a Deck and verify pinch, pan, and click each have the expected blocking recognizer in their requireFail array. Catches the `requestFailure` typo class of bug without depending on TypeScript flagging it through mjolnir's union type.
725e724 to
b8f30a0
Compare
chrisgervang
pushed a commit
that referenced
this pull request
Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Deck’s mjolnir recognizer setup so
requireFailurerelationships are actually passed toEventManager.Problem
Deck normalized recognizer tuples using
requestFailure, but mjolnir readsrequireFailure. The typo silently dropped the failure dependencies declared inRECOGNIZERS, so gestures such as two-finger pitch could be beaten by pinch recognition on touch devices.Change
requestFailuretorequireFailure.Deckand verifies pinch, pan, and click have the expected blocking recognizers in mjolnir’srequireFailarrays.Validation
GlobeController: two-finger vertical drag now pitches instead of being interpreted as a pinch/pan wobble.Merge Notes
Approved. Reviewer-requested regression coverage was added in follow-up commit
b8f30a09.Note
Low Risk
Small naming fix in touch event wiring plus a test; no auth, data, or rendering pipeline changes.
Overview
Fixes Deck’s mjolnir
EventManagersetup so gesture require-failure links fromRECOGNIZERSare actually applied: the recognizer config now uses therequireFailurekey mjolnir expects instead of the misspelledrequestFailure, which was silently ignored.That restores intended touch behavior (e.g. pinch and pan wait for multipan to fail before recognizing, and click waits for dblclick), which matters for two-finger pitch vs pinch on touch devices.
Adds a Deck unit test that inspects mjolnir’s
requireFailarrays afteronLoadto prevent regressions.Reviewed by Cursor Bugbot for commit 8ec29c5. Bugbot is set up for automated code reviews on this repo. Configure here.